-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update PostgreSqlPlatform.php #626
Conversation
If the database have different schemes, with objects, that the actual logged in user has no rights, the existing statements will collect all objects (sequences and tables) and try to read them in later steps. This will throws exceptions. The reason for that is the fact, that both procedures getListSequencesList() and getListTablesSQL() will receive all known database objects from postgres catalogs. But the actual logged-in user, maby has no read permissions to object inside other scheme-owner. The additional parts inside both sql-statements will reduce the result to only objects that the user are able to see.
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-930 We use Jira to track the state of pull requests and the versions they got |
WHERE relkind = 'S' | ||
AND n.oid = c.relnamespace | ||
AND (n.nspname NOT LIKE 'pg_%' AND n.nspname != 'information_schema') | ||
AND pg_table_is_visible(oid) is true"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build broke because column reference needs to be c.oid
.
missing table identifier added
correct table identifier
@x42p Testsuite is still failing. Can you please have a look? Thanks. |
@guilhermeblanco Wouldn't be better and more readle to replace the pg_catalog tables by the information_schema tables/views that shows only the objects that are granted to use for the current logged user? |
I take the guess an use the information_schema. It makes it more clear and simple
some format changes to trigger travis-cl once more again
If the database have different schemes, with objects, that the actual logged in user has no rights, the existing statements will collect all objects (sequences and tables) and try to read them in later steps. This will throws exceptions. The reason for that is the fact, that both procedures getListSequencesList() and getListTablesSQL() will receive all known database objects from postgres catalogs. But the actual logged-in user, maby has no read permissions to object inside other scheme-owner. The additional parts inside both sql-statements will reduce the result to only objects that the user are able to see.